<?php echo $__env->make('admin::layouts.header', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<div class="admin-main layui-anim layui-anim-upbit">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>重仓股基金</legend>
    </fieldset>
	<div class="demoTable layui-row">
		<div class="layui-form layui-form-pane" style="float:left;">
			<div class="layui-form-item">
				<label class="layui-form-label">快捷查询</label>
				<div class="layui-input-inline layui-form">
					<input class="layui-input" name="name" id="name" placeholder="请输入股票代码/股票名称">
				</div>
			</div>
        </div>
    </div>
	<div class="demoTable layui-row">
		<button class="layui-btn" style="margin-left:30px;margin-top:15px;" id="search" data-type="reload">查询</button>
		<a href="<?php echo e(route('api_admin.apis.zcgjj')); ?>" style="margin-top:15px;" class="layui-btn">重置</a>
		<a href="<?php echo e(route('api_admin.apis.zcgjj',['status'=>1])); ?>" style="margin-top:15px;" class="layui-btn">重新获取数据</a>
	</div>
    <table class="layui-table" id="list" lay-filter="list"></table>
</div>
<?php echo $__env->make('admin::layouts.footer', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<script>
    layui.use(['table','form'], function() {
        var table = layui.table,form = layui.form,$ = layui.jquery;
        var tableIn = table.render({
			id: 'ad',
            elem: '#list',
            url: "<?php echo e(route('api_admin.apis.zcgjj_store')); ?>",
            method:'get',
			toolbar: '#topBtn',
			title:'重仓股基金',
            cols: [[
                {field:'code', title: '股票代码', width:100,align: 'center',fixed: true}
                ,{field:'name', title: '股票名称',align: 'center', width:200}
                ,{field:'fundnum', title: '持有基金家数',align: 'center', width:200}
				,{field:'total', title: '持股总数（万股）',align: 'center', width:200}
                ,{field:'change', title: '持股变化（和上季度比）',align: 'center', width:200}
                ,{field:'totalcap', title: '持股总市值（万元）',align: 'center', width:200}
                ,{field:'accrate', title: '占该股流通市值比例（%）',align: 'center', width:300}
                ,{field:'changesta', title: '占流通股比例表变化（和上季度比）',align: 'center', width:300}    
            ]]
        });
		//搜索
        $('#search').on('click', function () {
			var name 		= $('#name').val();
            if ($.trim(name) === ''){
                layer.msg("<?php echo config('admin.query_condition'); ?>", {icon: 0});
                return;
            }
			tableIn.reload({
				where: {name:name}
			});
        });
    }); 
</script>
</body>
</html>